<html>
<body>
Reports <a href="https://www.c2.com/cgi/wiki?DoubleBraceInitialization">Double Brace Initialization</a>.
<p>Compared to regular initialization, double brace initialization provides worse performance since it requires loading an
  additional class.</p>
<p>It may also cause failure of <code>equals()</code> comparisons if the <code>equals()</code> method doesn't accept subclasses as
  parameters.</p>
<p>Double brace initialization may cause memory leaks when used in a non-static context. This is because it defines an anonymous class
  that will reference the surrounding object, when compiled with javac from before Java 18.</p>
<p>In addition, before Java 9, double brace initialization couldn't be combined with the diamond operator since it was incompatible
  with anonymous classes.
</p>
<p><b>Example:</b></p>
<pre><code>
  List&lt;Integer&gt; list = new ArrayList&lt;&gt;() {{
    add(1);
    add(2);
  }};
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
  List&lt;Integer&gt; list = new ArrayList&lt;&gt;();
  list.add(1);
  list.add(2);
</code></pre>
<!-- tooltip end -->
</body>
</html>